package com.ruikong.dazhi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@SpringBootConfiguration
@MapperScan("com.ruikong.dazhi.dao")
@EnableScheduling
public class DazhiApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(DazhiApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        //注意这里的参数要指向原先用main方法执行的Application启动类
        return builder.sources(this.getClass());
    }

}
